home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 July
/
EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso
/
earkit
/
news
/
thor
/
hd-install
/
thor.lha
/
rexx
/
BBSRead
/
CheckUserDataBase.br
< prev
next >
Wrap
Text File
|
1997-04-27
|
2KB
|
90 lines
/* CheckUserDataBase.br
*
* Script by: Eivind Nordseth, Ultima Thule Software.
*/
/* trace results */
parse arg argument
template = 'BBSNAME/A,DELETE/S'
if (argument = '' | argument = '?') then
do
say '$VER: CheckUserDataBase 4.1 (8.8.95)'
say 'Checks the the users in one or ALL BBSes. If the DELETE switch is used will '
say 'all users which are impossible to read be marked as deleted.'
say 'Template:' template
exit
end
if ~show('p', 'BBSREAD') then do
address command
"run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
"WaitForPort BBSREAD"
end
address BBSREAD
READARGS template ARGS CMDLINE argument
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
options failat 31
if upper(ARGS.BBSNAME) = "ALL" then
do
GETBBSLIST stem BBSLIST
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
do n=1 to BBSLIST.COUNT
call CheckBBS('"'||BBSLIST.n||'"')
end
end
else call CheckBBS('"'||ARGS.BBSNAME||'"')
exit
CheckBBS:
parse arg nameofbbs
say 'Checking:' strip(nameofbbs,'B','"')
GETBBSDATA nameofbbs BBSDATA
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
do k=BBSDATA.FIRSTUSER to BBSDATA.LASTUSER
READBRUSER nameofbbs k tagsstem TAGS datastem DATA
if(rc ~= 0) then
do
Say ' Error reading user' k ':' BBSREAD.LASTERROR
if ARGS.DELETE ~= 0 then
do
say ' Marking user as deleted.'
WRITEBRUSER nameofbbs UPDATEUSER k DELETEUSER
if(rc ~= 0) then
do
say ' Unable to mark user as deleted:' BBSREAD.LASTERROR
end
end
end
end
return